import axios from 'axios';

export function manualMoveApi(payload, callback, callError) {
  axios
      .post('/carrySystem/manualmove', payload)
      .then(response => {
        callback(response)
      })
      .catch(error => {
        callError(error)
      });
}

export function stopMoveApi(callback, callError) {
  axios
    .post('/carrySystem/stop')
    .then(response => {
      callback(response)
    })
    .catch(error => {
      callError(error)
    });
}

export function autoMoveApi(payload, callback, callError) {
  axios
  .post('/carrySystem/automove', payload)
  .then(response => {
      callback(response)
  })
  .catch(error => {
      callError(error)
  });
}